package com.campus_activity.campus_activity.domain.po;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 文章评论表
 * @TableName t_article_comment
 */
@TableName(value ="t_article_comment")
@Data
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Schema(description="ArticleComment对象")
@NoArgsConstructor
public class ArticleComment implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 作者id
     */
    private Long authorId;

    /**
     * 帖子id
     */
    private Long articleId;

    /**
     * 评论回复内容
     */
    private String content;

    /**
     * 上一级回复id 如果为最高父级评论则为0
     */
    private Long replyId;

    /**
     * 逻辑删除(0 否 1 是)
     */
    @TableLogic
    private Integer isDelete;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}